package view.impl;

import dao.AdminDao;
import dao.impl.AdminDaoImpl;
import model.Admin;
import view.AdminView;

import java.util.Scanner;

public class AdminViewImpl implements AdminView {
    private AdminDao adminDao=new AdminDaoImpl();
    @Override
    public Admin login() {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入用户名:");
        String adminName=sc.nextLine();

        System.out.println("请输入密码:");
        String password=sc.nextLine();
        return adminDao.getAdminByNameByPass(adminName,password);
    }
}
